<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			
			var stu = {
				id:1,
				name:"张三",
				age:18,
			}
			
			// 对象访问语句
			// 1. for ... in 对象
			for(var i in stu)
			{
				document.write(i+","+stu[i]+"<br />");
			}
			
			// 2. with语句
			with(stu)
			{
				document.write(id+","+name+","+age);
			}
			
			
		</script>
	</body>
</html>
